Connecting to SharePoint

Description

Learn how to setup a SharePoint 365 storage connection.

Discussion

In order to communicate with SharePoint, you need to create a trusted SharePoint Application for your SharePoint 365 site. Creating a trusted application requires a Client Id and Client Secret, which must be generated. The SharePoint Storage Connection String genie walks you through the process to create a trusted application so that Alpha Anywhere can access your SharePoint data.

To invoke the genie, click the SharePoint Storage Connection String Genie hyperlink when you define a new Storage Connection String. Storage connections are defined on the Web Projects Control Panel. Click Tools and select Storage Connection strings.

Add New Storage Connection String dialog
Add New Storage Connection String dialog

This will open the SharePoint Storage Connection String Genie. To begin, enter your SharePoint 365 site URL. The URL is the URL for your SharePoint 365 site that you'd like to access using a storage connection. For example:

https://mySharepointDomain.sharepoint.com/sites/MySharepointSiteName
Step 1 - Specify URL for your SharePoint site
Step 1 - Specify URL for your SharePoint site

Next, you need to create a SharePoint Application. Step 2 of the genie walks you through building a SharePoint Application and creating a Client Id and Client Secret.

In step 2, the Tenant Id is filled in automatically based on your SharePoint 365 URL provided in step 1. If the Tenant Id is empty, the SharePoint site URL is invalid. Return to the previous step and enter a valid SharePoint 365 site URL.

Step 2 - Create a new Application
Step 2 - Create a new Application

Proceed to the next step when you have your Client Id and Client Secret.

In step 3, register your SharePoint Application. Once you have completed the instructions for step 3, you will have registered your new SharePoint application, given the application necessary permissions, and confirmed the SharePoint can trust the application.

Step 3 - Register your Application
Step 3 - Register your Application

In the final step, the SharePoint storage connection string is shown. Here, you can copy the connection string to the clipboard using the Copy... button. Copying your connection string is optional as the connection string will be automatically populated into the Connection String field of the Add New Storage Connection String dialog when the builder is closed.

Step 4 - Copy your Storage Connection String
Step 4 - Copy your Storage Connection String

Click Close to return to the Add New Storage Connection String dialog. Give the connection string a name and click OK to save the SharePoint 365 connection string.

Name your SharePoint 365 Connection String
Name your SharePoint 365 Connection String

SharePoint connections can be used with all a5storage* helper functions (except a5storage_copyFiles()) to upload, download, delete, and list files stored in SharePoint 365.

Grid and UX applications can upload files to your SharePoint 365 account using the AmazonS3Indirect option when defining the image or file upload actions in Action Javascript.

See Storage Connections to learn more about storage connections.